package collections;

import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import utils.Log;

/**
 * 充分利用java集合框架代码，减少重复造轮子
 *
 *
 */
public class CollectionsTest {

  public static void main(String[] args) throws Exception {
    List<String> list = new ArrayList<>();

    List<TMessage> tMessages = new ArrayList<>();
    tMessages.add(new TMessage(2L));
    tMessages.add(new TMessage(8L));
    tMessages.add(new TMessage(6L));
    tMessages.add(new TMessage(7L));
    tMessages.add(new TMessage(5L));
    Collections.sort(tMessages);

    Log.vn("tMessages:" + tMessages.toString());
  }
}
